
class Dialog extends React.Component {
    constructor(props) {
        super(props)
    }

    render() {
        return (
            <div>
                <p>{this.props.title}</p>
                <p>{this.props.message}</p>
                {this.props.children}
                <div>
                    <button>取消</button>
                    <button>确定</button>
                </div>
            </div>
        )
    }
}

let rootContainer = document.getElementById("root")
ReactDOM.render(
    <Dialog title="标题" message="副标题">
        <input></input>
    </Dialog>,
    rootContainer
)